'Initialize the Company Object for the Connect method
vCompany.Server = "(local)"
vCompany.CompanyDB = "SBODemo_US"
vCompany.UserName = "manager"
vCompany.Password = "manager"
'If you enable "Identity and Authentication Management" after SAP Business One 10.0 FP 2208, you need to specify the user that is registered in the SLD, and the user binded company as the companyDB.
oCompany.Server = "DBA@<IP>:30013";
oCompany.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_HANADB;
oCompany.CompanyDB = "SBODemo_US";
oCompany.UserName = "b1manager";
oCompany.Password = "1234";
oCompany.SLDServer = "<IP>:40000";
Dim nResult As Long
Dim strErrString As String
'Connect to the database
nResult = vCompany.Connect
'Display the result
MsgBox("result is " + Str(nResult))
Call vCompany.GetLastError(nResult, strErrString)
MsgBox("GetLastError(" + Str(nResult) + ", " + strErrString + ")")